import * as types from './mutation-types'
import http from '@/utils/HttpClient'

const state = {
  data: null
}

const mutations = {
  [types.LOAD_ACHIEVEMENT] (_state, data) {
    _state.data = data
  }
}

const actions = {
  async getAchievements ({ commit }) {
    var data = await http.get({ url: 'weChatAchievement' })
    commit(types.LOAD_ACHIEVEMENT, data)
  }
}

const getters = {

}

export default {
  state,
  getters,
  actions,
  mutations
}
